<?php

use yii\helpers\Html;
use yii\widgets\DetailView;


$this->title = $model->cruise->name . '-' . $model->name;
$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Recreations'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="recreation-view">

    <h2 class="page-header"><?= Html::encode($this->title) ?>
    <p class="pull-right">
        <?= Html::a(Yii::t('app', 'Update'), ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?>
        <?= Html::a(Yii::t('app', 'Index'), ['recreation/index', 'cruise_id' => $model->cruise_id], ['class' => 'btn btn-danger']) ?>
    </p>
    </h2>

    <?= DetailView::widget([
        'model' => $model,
        'attributes' => [
            'cruise.name',
            'name',
            'en_name',
            'num',
            'open_time',
            [
                'attribute' => 'spend',
                'value' => Yii::$app->params['spend'][$model->spend],
            ],
            'ceil',
            'desc:html',
            [
                'attribute' => 'status',
                'value' => Yii::$app->params['status'][$model->status],
            ],
            'created_at:date',
            'updated_at:relativeTime',
        ],
    ]) ?>

</div>
